import time
from .celery import app

# 发送短信任务
@app.task()
def send_sms(phone, code):
    time.sleep(3)  # 模拟发送短信延迟
    print('短信发送成功，手机号是：%s，验证码是：%s' % (phone, code))
    return '短信发送成功'

# res=user_task.send_sms.apply_async(args=('12345566677', '8888'))


# res=user_task.send_sms.delay('12345566677', '8888')